package com.treeroot.springbootwithelastic.com.treeroot.es.tools;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.elasticsearch.index.query.MatchQueryBuilder;
import org.elasticsearch.search.builder.SearchSourceBuilder;

/**
 * @author treeroot
 * 复杂搜索的命令
 */
@Data
@Accessors(chain=true)
@AllArgsConstructor
@NoArgsConstructor
public class ComplexPagingSearchCmd {
    /**
     * 文档所在的索引
     */
    String docIndex;
    /**
     * 关键词搜索
     */
    String keyword;
    /**
     * 当前页
     */
    Integer currentPage;
    /**
     * 每页多少个
     */
    Integer pageSize;

    /**
     * 搜索源生成器
     */
    SearchSourceBuilder searchSourceBuilder;
    /**
     * 匹配查询生成器
     */
    MatchQueryBuilder matchQueryBuilder;
}
